{* FILTERS *}
<script language="javascript">

	var teamid = new Array();
	
	{assign var="idx" value="0"}

	{foreach from=$list item=strow}
		{eval var=$strow->id assign="stid"}
		teamid[{$idx}]={$stid};
		{assign var="idx" value="`$idx+1`"}
	{/foreach}	

	var current = 0;
	var max = {$idx}
	var done=false;
	
	{*	
	function autoscroll() {ldelim}
	  window.scrollTo( 0, document.getElementById('log_space').clientHeight );
	{rdelim}
  	*}
	
	function loadData() {ldelim}
		document.getElementById('console_frame').src='r.php?action=setupfiles&update={$update}&op=setup&teamid='+teamid[current]+'&sid={$sid}';
	{rdelim}
	
	function updateConsole() {ldelim}
		document.getElementById('log_space').innerHTML += '<br>' + document.getElementById('console_frame').contentDocument.body.innerHTML;
		if (current<max) {ldelim}
			loadData();
			current++;
		{rdelim} else {ldelim}
			if (!done)  {ldelim}
				done=true;
				document.getElementById('console_frame').src='r.php?action=setupfiles&op=done&sid={$sid}';		
			{rdelim} else  {ldelim}
				document.getElementById('backbutton').style.display="";
				//setTimeout(function redirect() {ldelim} document.getElementById('setup_form').submit(){rdelim},1500);
			{rdelim}
		{rdelim}
	{rdelim}

</script>

<iframe id="console_frame" style="display: none" onload="updateConsole();" >
</iframe>
<form method="post" id="setup_form">
	<input type="hidden" name="action" id="action" value="spradmin">
	<input type="hidden" name="id" id="id" value="{$projectid}">
</form>

<br/>

<center>
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
  <div style="border: 1px solid black;">
      <code id="log_space">
      	{$lang.dontleave}<br>
      	{$lang.createprj}
      </code>
  </div>
	<div id="backbutton" style="display: none;">
		{include file="button.tpl" name=$lang.back action="processForm('setup_form')"}
	</div>
</table>
<center>